﻿<Page x:Class="Resn.WhuPub.WPFClientUI.ManageTravelFlowsPage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      xmlns:extToolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended"
      Style="{StaticResource PageStyle}" Loaded="Page_Loaded">

        <Grid Name="LayoutRoot">
                <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition />
                        <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>

                <Grid>
                        <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="差旅" />
                        <TextBlock Grid.Column="1" Text="{Binding LoginEmployee.Name}" />
                        <Button Content="新建" Grid.Column="2"
                                Style="{DynamicResource ButtonStyle}" Click="CreateButton_Click" />
                        <Button Content="编辑" Grid.Column="3"
                                Style="{DynamicResource ButtonStyle}" Click="UpdateButton_Click" />
                        <Button Content="删除" Grid.Column="4"
                                Style="{DynamicResource ButtonStyle}" Click="DeleteButton_Click" />
                        <extToolkit:SplitButton Grid.Column="5" Content="搜索" Style="{StaticResource SplitButtonStyle}" Click="SearchButton_Click">
                                <extToolkit:SplitButton.DropDownContent>
                                        <Border Style="{StaticResource BorderStyle}"
                                                Background="{StaticResource ContentGridColor}">
                                                <StackPanel>
                                                        <Button Content="全部" Style="{DynamicResource ButtonStyle}" 
                                                                Click="SearchAllButton_Click"/>
                                                        <Button Content="等待审批" Style="{DynamicResource ButtonStyle}"
                                                                Click="SearchWaitForApproveButton_Click" />
                                                        <Button Content="等待修改" Style="{DynamicResource ButtonStyle}"
                                                                Click="SearchWaitForModifyButton_Click" />
                                                        <Button Content="等待确认" Style="{DynamicResource ButtonStyle}"
                                                                Click="SearchWaitForConfirmButton_Click" />
                                                        <Button Content="等待完结" Style="{DynamicResource ButtonStyle}"
                                                                Click="SearchWaitForCompleteButton_Click" />
                                                        <Button Content="已经完结" Style="{DynamicResource ButtonStyle}"
                                                                Click="SearchCompleteButton_Click" />
                                                </StackPanel>
                                        </Border>
                                </extToolkit:SplitButton.DropDownContent>
                        </extToolkit:SplitButton>
                </Grid>

                <Grid Grid.Row="1">
                        <ListBox Name="TravelFlowsListBox"
                                 Style="{StaticResource ListBoxStyle}"
                                 ItemsSource="{Binding TravelFlows}"
                                 ItemTemplate="{StaticResource TravelFlowDataTemplate}"
                                 SelectedValue="{Binding TravelFlow}"
                                 MouseDoubleClick="TravelFlowsListBox_OnMouseDoubleClick" />
                </Grid>

                <Grid Grid.Row="2">
                        <Grid.ColumnDefinitions>
                                <ColumnDefinition />
                                <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <Button Grid.Column="1" Style="{StaticResource PageBackButtonStyle}" />
                                
                </Grid>
        </Grid>
</Page>